package com.leejxx.wemedia.controller.v1;

import com.leejxx.model.common.dto.ResponseResult;
import com.leejxx.model.wemedia.dtos.WmUserDto;
import com.leejxx.wemedia.service.WmUserService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Author LeeJx
 * @ClassName LoginController
 * @Description TODO
 * @date 2021/2/23 21:39
 * @Version 1.0
 */
@RestController
@Slf4j
@RequestMapping("/login")
public class LoginController {
    @Autowired
    private WmUserService wmUserService;

    @RequestMapping("/in")
    public ResponseResult login(@RequestBody WmUserDto dto) {
        log.info("[data]{}", dto);
        return wmUserService.login(dto);
    }
}
